directives.directive('chartLine', ['tools','NoticeServ',function (tools,NoticeServ) {
	return {
		restrict: 'E',
		scope:{
			configline:'='
		},
		replace:true,
		templateUrl:'app/tpls/chart-line/chartLine.html',
		link: function (scope, element, iAttrs) {
			var myChart = echarts.init($(element).find('#chartLine')[0], 'westeros');
			// myChart.showLoading();
			console.log('configline:');
			console.log(scope.configline);

			
			NoticeServ.$on(scope,'GLOBAL_CATEGORY_CHANGE_EV',function(e,catName){
        		console.log('GLOBAL_CATEGORY_CHANGE_EV:'+catName);
        	
        		console.log('99999')
        		scope.configline.get(scope,myChart,catName);
        	});

		}
	};
}])